<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>网页底部</title>
    {template 'stourtravel/public/public_min_js'}
    {php echo Common::getCss('style.css,base.css,base2.css,base_new.css'); }
    {php echo Common::getScript("jquery.validate.js"); }
    {php echo Common::getScript("uploadify/jquery.uploadify.min.js,choose.js,product_add.js,imageup.js"); }
    {php echo Common::getCss('uploadify.css','js/uploadify/'); }
    {php echo Common::getScript('config.js');}
</head>

<body>

<table class="content-tab">
    <tr>
        <td width="119px" class="content-lt-td"  valign="top">
            {template 'stourtravel/public/leftnav'}
            <!--右侧内容区-->
        </td>
        <td valign="top" class="content-rt-td">
            <form id="configfrm">
                <div class="cfg-header-bar">
                    <a href="javascript:;" class="fr btn btn-primary radius mt-6 mr-10" onclick="window.location.reload()">刷新</a>
                </div>
                <div class="clear pt-20 pl-20">
                    <span class="item-hd">{Common::get_help_icon('cfg_supplier_footer_editor')}</span>
                    {php Common::getEditor('cfg_supplier_footer',$configinfo['value'],$sysconfig['cfg_admin_htmleditor_width'],300);}
                </div>
                <div class="clearfix pd-20">
                    <a class="btn btn-primary radius size-L" href="javascript:;" id="btn_save">保存</a>
                </div>
            </form>
        </td>
    </tr>
</table>

<input type="hidden" id="webid" value="0">


<script>

    $(document).ready(function(){

        //选中导航
        $('.leftnav').find('a').each(function(i,obj){
            var dataUrl = $(obj).data('url');
            if(dataUrl == '/plugins/supplier/set/footer/parentkey/supplier/itemid/2'){
                $(obj).addClass('active');
            }
        })
        //配置信息保存
        $("#btn_save").click(function(){
            var webid= $("#webid").val();
            Config.saveConfig(webid);
        })

        //setTimeout(getConfig,500);//延迟500毫秒调用数据显示,防止编辑器没有加载完成返回错误.
    });


    //获取配置
    function getConfig(webid)
    {
        Config.getConfig(webid,function(data){
            cfg_footerEditor.setContent(data.cfg_footer);

        })

    }

</script>

</body>
</html>
